package com.cloud.consumer.ribbon.controller;

import com.cloud.consumer.ribbon.bean.User;
import com.cloud.consumer.ribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: myboots
 * @description: 拿服务
 * @author: Mr.Zou
 * @create: 2019-08-13 17:43
 **/
@RestController
public class HelloControler {

    @Autowired
    HelloService helloService;

    @GetMapping("/hi")
    public String hi(@RequestParam String name) {
        return helloService.hiService(name);
    }

    @GetMapping("bye")
    public String bye(@RequestParam String name) {
        return helloService.bye(name);
    }

    @GetMapping("/user")
    public User user(Long id, String name) {
        return helloService.getUser(id, name);
    }




}



